package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;


/**
 * The persistent class for the emp_work_history database table.
 * 
 */
@Entity
@Table(name="emp_work_history")
@NamedQuery(name="EmpWorkHistory.findAll", query="SELECT e FROM EmpWorkHistory e")
public class EmpWorkHistory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;

	private String address;

	@Temporal(TemporalType.DATE)
	@Column(name="begin_date")
	private Date beginDate;

	@Column(name="company_name")
	private String companyName;

	@Column(name="contact_person")
	private String contactPerson;

	@Column(name="contact_tel")
	private String contactTel;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	private Date endDate;

	private String position;

	private String remark;


	//bi-directional many-to-one association to Emp
	@ManyToOne
	@JSONField(serialize=false)
	@JoinColumn(name="emp_id")
	private Emp emp;

	public EmpWorkHistory() {
	}


	public EmpWorkHistory(String address, Date beginDate, String companyName, String contactPerson, String contactTel,
			Date endDate, String position, String remark) {
		super();
		this.address = address;
		this.beginDate = beginDate;
		this.companyName = companyName;
		this.contactPerson = contactPerson;
		this.contactTel = contactTel;
		this.endDate = endDate;
		this.position = position;
		this.remark = remark;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getContactTel() {
		return this.contactTel;
	}

	public void setContactTel(String contactTel) {
		this.contactTel = contactTel;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getPosition() {
		return this.position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

}